#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;

class Heath
{
public:
    void set()
    {

        cin >> name;
        cin >> height;
        cin >> weight;
        cin >> yaowei;
    }
    void show()
    {
        double a, b, c, d, n;
        int o;
        n = weight / (height * height);
        o = round(n);
        a = yaowei * 0.74;
        b = weight * 0.082 + 34.89;
        c = a - b;
        d = c / weight;
        cout << name << "的BMI指数为" << o << "--体脂率为" << setprecision(2) << d << endl;
    }

private:
    char name[50];
    double height;
    double weight;
    double yaowei;
};

int main()
{
    int t, i;
    cin >> t;
    Heath heath[t];
    for (i = 0; i < t; i++)
    {
        heath[i].set();
    }
    for (i = 0; i < t; i++)
    {
        heath[i].show();
    }
    return 0;
}
